<template>
  <d2-container class="tasklist">
    <template slot="header">发货列表</template>
    <div style="display:flex;flex-direction: column;">
      <div style="display:flex;margin-top:20px;margin-bottom:20px;">
        <el-date-picker end-placeholder="结束日期" range-separator="至" start-placeholder="开始日期"
                        type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
                        v-model="value1">
        </el-date-picker>
        <el-input v-model="order_num" style="width:200px;margin-left:10px;" placeholder="请输入订单号"></el-input>
        <el-input v-model="waybill_num" style="width:200px;margin-left:10px;" placeholder="请输入运单号"></el-input>
        <el-input v-model="cooperation_id" style="width:200px;margin-left:10px;" placeholder="请输入商家id"></el-input>
        <el-button type="primary" style="margin-left:10px;" @click="dailystatistic_Serach()">查询</el-button>
      </div>
    </div>
    <el-table
      :data="tableData"
      border
      style="width: 100%;overflow-y: scroll;">
      <el-table-column
        prop="user"
        align="center"
        width="100"
        label="用户">
      </el-table-column>
      <el-table-column
        prop="commission"
        align="center"
        width="120"
        label="平台利润">
      </el-table-column>
      <el-table-column
        prop="order_num"
        align="center"
        label="订单号">
      </el-table-column>
      <el-table-column
        prop="waybill_num"
        align="center"
        label="运单号">
      </el-table-column>
      <el-table-column
        prop="receiver_name"
        align="center"
        label="收件人姓名">
      </el-table-column>
      <el-table-column
        prop="receiver_phone"
        align="center"
        label="收件人手机">
      </el-table-column>
      <el-table-column
        prop="receiver_prov"
        align="center"
        label="收件人省">
      </el-table-column>
      <el-table-column
        prop="receiver_city"
        align="center"
        label="收件人市">
      </el-table-column>
      <el-table-column
        prop="receiver_county"
        align="center"
        label="收件人区">
      </el-table-column>
      <el-table-column
        prop="receiver_address"
        align="center"
        label="收件人详细地址">
      </el-table-column>
      <el-table-column
        prop="empty_type"
        align="center"
        width="200"
        label="空包类型">
      </el-table-column>
      <el-table-column
        prop="create_time"
        align="center"
        label="创建时间">
      </el-table-column>
      <el-table-column
        prop="price_money"
        align="center"
        label="支付价格">
      </el-table-column>
    </el-table>
    <el-pagination
      @current-change="handleCurrentChange"
      :current-page.sync="page"
      :page-size="10"
      layout="total, prev, pager, next"
      :total="Number(count)">
    </el-pagination>
  </d2-container>
</template>

<script>
  import { shiplist } from "@/api/sys.login";
  export default {
        name: "index",
        data(){
            return{
              count:"",
              value1:"",
              tableData:[],
              order_num:"",
              cooperation_id:"",
              waybill_num:"",
              pagesize:10,
              page:1
            }
        },
       methods:{
         // 查询
         dailystatistic_Serach(){
           shiplist(this.page,this.pagesize,this.order_num,this.waybill_num,this.cooperation_id,this.value1).then((res)=>{
             this.tableData = res.list
             this.count =res.count
           })
         },
         //列表
         shiplists(){
           shiplist(this.page,this.pagesize,this.order_num,this.waybill_num,this.cooperation_id,this.value1).then((res)=>{
             this.tableData = res.list
             this.count =res.count
           })
         },
         //分页
         handleCurrentChange(val) {
           this.page = val
           this.shiplists()
         },
       },
      created() {
          this.shiplists()
      }
  }
</script>

<style scoped>

</style>
